package org.vison.framework.doc.web;

import lombok.Data;

/**
 * 基础响应类
 * 用于统一返回格式
 */

@Data
public class BaseRes<T> {
    private int ret;
    private T data;
    private String msg;

    public static <T> BaseRes<T> success(T data){
        BaseRes<T> res = new BaseRes<>();
        res.ret = 0;
        res.msg = "success";
        res.data = data;
        return res;
    }

}
